include ../Makehead

LdFlags += -Ttext 0
CPP += -I../include

DelObjs = bootsect setup 

build: bootsect setup head.o 

bootsect: bootsect.s 
	$(AS) $< -o bootsect.o 
	$(LD) $(LdFlags) bootsect.o -o $@
	$(OBJCOPY) $@
bootsect.s: bootsect.S 
	$(CPP) $< -o $@ 

setup: setup.s 
	$(AS) $< -o setup.o 
	$(LD) $(LdFlags) setup.o -o $@
	$(OBJCOPY) $@
setup.s: setup.S 
	$(CPP) $< -o $@

head.o:	head.s 
	$(AS) -o $@ $<
head.s: head.S 
	$(CPP) -o $@ $<
	
clean: 
	rm -rf *.o *.s $(DelObjs)
